const mongoose = require("mongoose");
mongoose.Promise = Promise;
mongoose.connect("mongodb://localhost/user");
const db = mongoose.connection;
db.on("open", () => {
  console.log("打开数据库成功！");
});

const Student = mongoose.model("users", {
  name: String,
  password: String
});
module.exports = Student;